#!/bin/env perl
# Package main
use strict "vars";
use warnings;
use Cwd;
#our ( @friends, @dogs, $key, $value );    # Declaring variables
#my($name,$pal,$money);
#
#$name="Susanne";
#@friends=qw(Joe Jeff Jan );
#@dogs = qw(Guyson Lara Junior);
#
#local $main::dude="Ernie";    # Keep strict happy
#
#my $pal = "Linda";            # Not in the symbol table
#my $money = 1000;


#my @pkgSymbols = ();
#
## Look at main's symbol table
#while(my ($key, $value) = each (%main::))
#{
#	push @pkgSymbols, "($key 3333333333 $value)\n" ;
#}
#
#my @sortedSymbols = sort {$a cmp $b} @pkgSymbols;
#
#print @sortedSymbols;


my $strIp = "1.1.2.2";

	my $intIp = 0;
	
	my @bytes = split ('\.', $strIp);
	foreach my $byte (@bytes)
	{
		$intIp <<= 8;
		$intIp += $byte;
	}
	print  $intIp;